/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uva;

import java.io.IOException;
import java.util.StringTokenizer;

/**
 *
 * @author Mohamed.Azouz
 */
public class Main {

    String[] fibSeries = new String[32];

    public void genrate() {
        fibSeries[0] = "0";
        fibSeries[1] = "1";
        fib(30);
    }

    public void findFib100(int num, int i, int j) {

        String res = fibSeries[num];
        System.out.println(res.subSequence(i, j));
    }

    public String fib(int n) {
        if (fibSeries[n] != null) {
            return fibSeries[n];
        }
        StringBuilder b = new StringBuilder(fib(n - 2));
        b.append((fib(n - 1)));
        fibSeries[n] = b.toString();
        return fibSeries[n];
    }

    static String ReadLn(int maxLg) // utility function to read from stdin
    {
        byte lin[] = new byte[maxLg];
        int lg = 0, car = -1;
        String line = "";

        try {
            while (lg < maxLg) {
                car = System.in.read();
                if ((car < 0) || (car == '\n')) {
                    break;
                }
                lin[lg++] += car;
            }
        } catch (IOException e) {
            return (null);
        }

        if ((car < 0) && (lg == 0)) {
            return (null);  // eof
        }
        return (new String(lin, 0, lg));
    }

    public static void main(String[] String) {
        Main m = new Main();

        int sz = 1;
        for (int i = 0; i < sz; i++) {
            //String input = Main.ReadLn(255);
            //StringTokenizer idata = new StringTokenizer(input);
            int num = 30;//Integer.parseInt(idata.nextToken());
            int f = 2;//Integer.parseInt(idata.nextToken());
            int e = 10;// Integer.parseInt(idata.nextToken());
            m.genrate();
            m.findFib100(num, f, e + 1);
        }
    }
}
